package com.ruoyi.project.app.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.app.mapper.AppDispatchMapper;
import com.ruoyi.project.app.domain.AppDispatch;
import com.ruoyi.project.app.service.IAppDispatchService;

/**
 * 客服调度Service业务层处理
 * 
 * @author hry
 * @date 2020-10-15
 */
@Service
public class AppDispatchServiceImpl extends ServiceImpl<AppDispatchMapper, AppDispatch> implements IAppDispatchService
{
    @Autowired
    private AppDispatchMapper appDispatchMapper;

    /**
     * 查询客服调度
     * 
     * @param id 客服调度ID
     * @return 客服调度
     */
    @Override
    public AppDispatch selectAppDispatchById(Long id)
    {
        return appDispatchMapper.selectAppDispatchById(id);
    }

    /**
     * 查询客服调度列表
     * 
     * @param appDispatch 客服调度
     * @return 客服调度
     */
    @Override
    public List<AppDispatch> selectAppDispatchList(AppDispatch appDispatch)
    {
        return appDispatchMapper.selectAppDispatchList(appDispatch);
    }

    /**
     * 新增客服调度
     * 
     * @param appDispatch 客服调度
     * @return 结果
     */
    @Override
    public int insertAppDispatch(AppDispatch appDispatch)
    {
        appDispatch.setCreateTime(DateUtils.getNowDate());
        return appDispatchMapper.insertAppDispatch(appDispatch);
    }

    /**
     * 修改客服调度
     * 
     * @param appDispatch 客服调度
     * @return 结果
     */
    @Override
    public int updateAppDispatch(AppDispatch appDispatch)
    {
        return appDispatchMapper.updateAppDispatch(appDispatch);
    }

    /**
     * 批量删除客服调度
     * 
     * @param ids 需要删除的客服调度ID
     * @return 结果
     */
    @Override
    public int deleteAppDispatchByIds(Long[] ids)
    {
        return appDispatchMapper.deleteAppDispatchByIds(ids);
    }

    /**
     * 删除客服调度信息
     * 
     * @param id 客服调度ID
     * @return 结果
     */
    @Override
    public int deleteAppDispatchById(Long id)
    {
        return appDispatchMapper.deleteAppDispatchById(id);
    }
}
